<?php
$itemurl = Util::addParameter('item.php', array('item' => $item_id,
                                                'itemlist' => $itemlist_id));

$share = $GLOBALS['groo_shares']->getShare($itemlist_id);
?>
<div class="header">
 <span class="smallheader" style="float:right">
 <?php if (!$print_view) : ?>
 <?php if ($share->hasPermission(Auth::getAuth(), PERMS_EDIT)): ?>
   <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($itemurl, 'actionID', 'modify_item')), _("Edit"), 'smallheader', '', '', _("_Edit")) ?>
   |
 <?php endif; ?>
 <?php if ($share->hasPermission(Auth::getAuth(), PERMS_DELETE)): ?>
   <?php echo Horde::widget(Horde::applicationUrl(Util::addParameter($itemurl, 'actionID', 'delete_items')), _("Delete"), 'smallheader', '', $prefs->getValue('delete_opt') ? 'return window.confirm(\'' . addslashes(_("Really delete this item?")) . '\');' : '', _("_Delete")) ?>
   |
 <?php endif; ?>
 <?php echo Horde::widget(Horde::applicationUrl('list.php'), _("Back to Collection"), 'smallheader', '', '', _("_Back to Collection")) ?>&nbsp;&nbsp;
 <?php endif; ?>
 </span>
 <?php echo _("Item Details") ?>
</div>

<table cellspacing="0" width="100%" class="headerbox striped nowrap">
<tr>
  <td align="right"><strong><?php echo _("Category") ?></strong>&nbsp;</td>
  <td width="100%"><?php echo htmlspecialchars($item['category'] ? $item['category'] : _("Unfiled")) ?></td>
</tr>

<?php if (isset($created)): ?>
<tr>
  <td align="right"><strong><?php echo _("Created") ?></strong>&nbsp;</td>
  <td><?php echo strftime($prefs->getValue('date_format'), $created) . ' ' . date($prefs->getValue('twentyFour') ? 'G:i' : 'g:i a', $created) ?></td>
</tr>
<?php endif; ?>

<?php if (isset($modified)): ?>
<tr>
  <td align="right"><strong><?php echo _("Last Modified") ?></strong>&nbsp;</td>
  <td><?php echo strftime($prefs->getValue('date_format'), $modified) . ' ' . date($prefs->getValue('twentyFour') ? 'G:i' : 'g:i a', $modified) ?></td>
</tr>
<?php endif; ?>

<tr>
  <td valign="top" align="right"><strong><?php echo _("Item Text") ?></strong>&nbsp;</td>
  <td class="fixed"><?php echo Text_Filter::filter($item['body'], 'text2html', array('parselevel' => TEXT_HTML_MICRO)) ?></td>
</tr>
</table>
